package com.chance.cc.crawler.prod.command.trigger.domain.news.wangyi;

import com.chance.cc.crawler.core.CrawlerJob;
import com.chance.cc.crawler.core.downloader.HttpPage;
import com.chance.cc.crawler.meta.core.bean.CrawlerMetaConstant;
import com.chance.cc.crawler.prod.command.job.domain.news.wangyi.realtime.*;
import com.chance.cc.crawler.prod.command.job.domain.news.wangyi.trace.WangYiCarSeriesCommentCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.job.domain.news.wangyi.trace.WangYiCarSeriesKeyCommentCrawlerScheduleJob;
import com.chance.cc.crawler.prod.command.trigger.CommonCrawlerSchedulerTrigger;

/**
 * @author bx
 * @date 2020/12/7 0007 11:15
 */
public class WangYiCarSeriesScheduleTrigger extends CommonCrawlerSchedulerTrigger {

    public static void main(String[] args) {//运行工作爬虫
//        经销商文章
//        publishWangYiCarSeriesArticleRealtimeScheduleTriggerInfo(WangYiCarSeriesArticleCrawlerScheduleJob.publishWangYiCarSeriesArticleCrawlerScheduleJobInfo());
        publishWangYiCarSeriesCommentRealtimeScheduleTriggerInfo(WangYiCarSeriesCommentCrawlerScheduleJob.publishWangYiCarSeriesCommentCrawlerScheduleJobInfo());
//        关键词
//        publishWangYiCarSeriesArticleKeyRealtimeScheduleTriggerInfo(WangYiCarSeriesArticleKeyCrawlerScheduleJob.publishWangYiCarSeriesArticleCrawlerScheduleJobInfo());
//        publishWangYiCarSeriesKeyCommentRealtimeScheduleTriggerInfo(WangYiCarSeriesKeyCommentCrawlerScheduleJob.publishWangYiCarSeriesCommentCrawlerScheduleJobInfo());


//        经销商文章临时采集
//        publishWangYiCarSeriesSimpleRealtimeScheduleTriggerInfo(WangYiCarSeriesArticleSimpleCrawlerSchedulerJob.crawlerScheduler());//临时采集

//        购 车
//        publishWangYiCarBuyArticleRealtimeScheduleTriggerInfo(WangYiCarBuyCrawlerScheduleJob.publishCrawlerScheduleJobInfo());
//        publishWangYiCarBuyCommentRealtimeScheduleTriggerInfo(WangYiCarBuyCommentCrawlerScheduleJob.publishWangYiCommentCrawlerScheduleJobInfo());
//        试 驾
//        publishWangYiCarDriveArticleRealtimeScheduleTriggerInfo(WangYiCarDriveCrawlerScheduleJob.publishCrawlerScheduleJobInfo());
//        publishWangYiCarDriveCommentRealtimeScheduleTriggerInfo(WangYiCarDriveCommentCrawlerScheduleJob.publishWangYiCommentCrawlerScheduleJobInfo());
//        新能源
//        publishWangYiCarEnergyArticleRealtimeScheduleTriggerInfo(WangYiCarEnergyCrawlerScheduleJob.publishCrawlerScheduleJobInfo());
//        publishWangYiCarEnergyCommentRealtimeScheduleTriggerInfo(WangYiCarEnergyCommentCrawlerScheduleJob.publishWangYiCommentCrawlerScheduleJobInfo());
//        导 购
//        publishWangYiCarGuideArticleRealtimeScheduleTriggerInfo(WangYiCarGuideCrawlerScheduleJob.publishCrawlerScheduleJobInfo());
//        publishWangYiCarGuideCommentRealtimeScheduleTriggerInfo(WangYiCarGuideCommentCrawlerScheduleJob.publishWangYiCommentCrawlerScheduleJobInfo());
//        行 业
//        publishWangYiCarIndustryArticleRealtimeScheduleTriggerInfo(WangYiCarIndustryCrawlerScheduleJob.publishCrawlerScheduleJobInfo());
//        publishWangYiCarIndustryCommentRealtimeScheduleTriggerInfo(WangYiCarIndustryCommentCrawlerScheduleJob.publishWangYiCommentCrawlerScheduleJobInfo());
//        新 车
//        publishWangYiCarNewArticleRealtimeScheduleTriggerInfo(WangYiCarNewCrawlerScheduleJob.publishCrawlerScheduleJobInfo());
//        publishWangYiCarNewCommentRealtimeScheduleTriggerInfo(WangYiCarNewCommentCrawlerScheduleJob.publishWangYiCommentCrawlerScheduleJobInfo());

//        车系id
//        publishWangYiCarSeriesScheduleTriggerInfo(WangYiCarSeriesCrawlerScheduleJob.publishCrawlerScheduleJobInfo());

//        百度搜索网易新闻
        publishWangYiNewsArticleScheduleTriggerInfo(WangYiNewsArticleCrawlerScheduleJob.publishCrawlerScheduleJobInfo());

    }

    //车系文章
    public static void publishWangYiCarSeriesArticleRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 17 * * ?", "网易车系页文章每天17点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }

    //车系文章评论
    public static void publishWangYiCarSeriesCommentRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 19 * * ?", "网易车系页评论每天19点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }


    //车系文章
    public static void publishWangYiCarSeriesArticleKeyRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 9 * * ?", "网易车系页文章每天1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }

    //车系文章评论
    public static void publishWangYiCarSeriesKeyCommentRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 12 * * ?", "网易车系页评论每天1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }



    //车系文章临时采集
    public static void publishWangYiCarSeriesSimpleRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Simple, "", "网易车系页临时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }




    //车系文章
    public static void publishWangYiCarBuyArticleRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 1 * * ?", "网易购车文章每天1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }

    //车系文章评论
    public static void publishWangYiCarBuyCommentRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 3 * * ?", "网易购车评论每天3点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }

    //车系文章
    public static void publishWangYiCarDriveArticleRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 2 * * ?", "网易试驾每天1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }

    //车系文章评论
    public static void publishWangYiCarDriveCommentRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 4 * * ?", "网易试驾评论每天1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }

    //车系文章
    public static void publishWangYiCarEnergyArticleRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 3 * * ?", "网易车系页文章每天1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }

    //车系文章评论
    public static void publishWangYiCarEnergyCommentRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 5 * * ?", "网易车系页评论每天1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }

    //车系文章
    public static void publishWangYiCarGuideArticleRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 4 * * ?", "网易车系页文章每天1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }

    //车系文章评论
    public static void publishWangYiCarGuideCommentRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 6 * * ?", "网易车系页评论每天1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }

    //车系文章
    public static void publishWangYiCarIndustryArticleRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 5 * * ?", "网易车系页文章每天1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }

    //车系文章评论
    public static void publishWangYiCarIndustryCommentRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 7 * * ?", "网易车系页评论每天1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }

    //车系文章
    public static void publishWangYiCarNewArticleRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 6 * * ?", "网易车系页文章每天1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }

    //车系文章评论
    public static void publishWangYiCarNewCommentRealtimeScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 8 * * ?", "网易车系页评论每天1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }


    //车系id
    public static void publishWangYiCarSeriesScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 1 1 * ?", "网易车系每月1号1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }


    //百度搜索网易新闻
    public static void publishWangYiNewsArticleScheduleTriggerInfo(CrawlerJob crawlerJob){//实时调度触发信息
        HttpPage page = metaServiceCommand_17.addOrUpdateScheduleCrawlerTrigger(//添加调度爬虫触发
                crawlerJob.generateCrawlerKey(),//生成爬虫key
                crawlerJob.generateCrawlerTriggerKey(),//生成爬虫触发key
                WangYiCarSeriesArticleCrawlerScheduleJob.domain,//工作的域
                CrawlerMetaConstant.ScheduleJobTrigger_Cron, "0 0 1 * * ?", "百度搜索网易新闻每天1点定时采集");//采集信息-
        System.out.println("添加采集调度： "+page.getRawText());//调度文本
    }

}
